package com.ruoyi.pollutant.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pollutant.mapper.OutletSolidMapper;
import com.ruoyi.pollutant.domain.OutletSolid;
import com.ruoyi.pollutant.service.IOutletSolidService;

/**
 * 固体废物排放Service业务层处理
 * 
 * @author yxf
 * @date 2021-08-10
 */
@Service
public class OutletSolidServiceImpl implements IOutletSolidService 
{
    @Autowired
    private OutletSolidMapper outletSolidMapper;

    /**
     * 查询固体废物排放
     * 
     * @param soId 固体废物排放ID
     * @return 固体废物排放
     */
    @Override
    public OutletSolid selectOutletSolidById(Long soId)
    {
        return outletSolidMapper.selectOutletSolidById(soId);
    }

    /**
     * 查询固体废物排放列表
     * 
     * @param outletSolid 固体废物排放
     * @return 固体废物排放
     */
    @Override
    public List<OutletSolid> selectOutletSolidList(OutletSolid outletSolid)
    {
        return outletSolidMapper.selectOutletSolidList(outletSolid);
    }

    /**
     * 新增固体废物排放
     * 
     * @param outletSolid 固体废物排放
     * @return 结果
     */
    @Override
    public int insertOutletSolid(OutletSolid outletSolid)
    {
        outletSolid.setCreateTime(DateUtils.getNowDate());
        return outletSolidMapper.insertOutletSolid(outletSolid);
    }

    /**
     * 修改固体废物排放
     * 
     * @param outletSolid 固体废物排放
     * @return 结果
     */
    @Override
    public int updateOutletSolid(OutletSolid outletSolid)
    {
        outletSolid.setUpdateTime(DateUtils.getNowDate());
        return outletSolidMapper.updateOutletSolid(outletSolid);
    }

    /**
     * 批量删除固体废物排放
     * 
     * @param soIds 需要删除的固体废物排放ID
     * @return 结果
     */
    @Override
    public int deleteOutletSolidByIds(Long[] soIds)
    {
        return outletSolidMapper.deleteOutletSolidByIds(soIds);
    }

    /**
     * 删除固体废物排放信息
     * 
     * @param soId 固体废物排放ID
     * @return 结果
     */
    @Override
    public int deleteOutletSolidById(Long soId)
    {
        return outletSolidMapper.deleteOutletSolidById(soId);
    }
}
